import Image
import ImageFilter

import matplotlib
import ROC

# os.chdir(r'C:\My Code Projects\python-opencv\trunk\lib\python\digitalMatting')


box1=(208,73,485,284)  #the gray patch on the bird's body (left, upper, right, lower)

imR=Image.open(r'C:\My ClipArt\digitalMatting\samples\red.jpg').crop(box1);
imG=Image.open(r'C:\My ClipArt\digitalMatting\samples\green.jpg').crop(box1);
imB=Image.open(r'C:\My ClipArt\digitalMatting\samples\blue.jpg').crop(box1);


#********Plotting the information**********

#first we will compare a patch of the background verus a patch on the forground object
#we are interested in:
#1. How the RGB histograms compare for the two patches.
#2. How the difference compares between the 2 patches

patchBackground=(167,12,257,74) #(left, upper, right, lower)
patchBird=(145,123,173,155)

ROC.imROC(imR, imG, cropBox=patchBackground)
#compareImageHist(imR, imG, cropBox=patchBird,legendText=('bird infront of red', 'bird in front of green'))
